const routes = [
  // 一级路由
    {
      path: '/index/HelloWorld',
      name: '/index',
      meta:{title:'饿了么首页'},
    component: () => import('../views/Index.vue'),
      // 二级路由
    children: [
      {
        path: '/HelloWorld',
        name: 'HelloWorld',
        meta:{title:'首页'},
        component:()=>import('../views/Index/HelloWorld.vue')
      },
      // 爆爆团
      {
        path: '/Tuan',
        name: 'Tuan',
        meta:{title:'爆爆团'},
        component:()=>import('../views/Index/BaoTuan.vue')
      },
      // 订单
      {
        path: '/Order',
        name: 'Order',
        meta:{title:'订单'},

        component:()=>import('../views/Index/Order.vue')
      },
      // 我的
      {
        path: '/mine',
        name: 'mine',
        meta:{title:'我的'},

        component: () => import('../views/Index/Wode.vue'),
      },
      ]
  },
  // 店铺详情
  {
    path: '/details',
    name: '详情',
    component:()=>import('../views/Index/Details.vue')
  },
  // 登录
  {
    path: '/LoGin',
    name: 'login',
    meta: { title: '登录' },
    component:()=>import('../components/LoGinb.vue')
      },
  // 收货地址
  {
    path: '/Delivery',
    name: 'Delivery',
    component:()=>import('../views/Index/sanji/Delivery.vue')
  },
    
  // 店铺详情
  {
    path:'/detail/:id',
    meta: { title:'详情页' },
    component: () => import('../views/Index/Details.vue')
  },
  // 搜索详情
  {
    path: '/searchview',
    meta: { title: '搜索页' },
    component:()=>import('../components/search.vue')
  },
    {
      path: '/',
      redirect:'/HelloWrold'
  },
    // 404路由
  {
    path: '*',
    component:()=>import('../views/NotFound.vue')
    }
]
  
export default routes